here is a nested test
\begin{one}%
 [%
  optional argument%
 ]
 to be nested to be nested
 to be nested to be nested
 to be nested to be nested
 \begin{two}\[ x^2\]
  nested text nested tex nested tex%
	  [%
	   not an argument%
	  ]
  nested text nested tex nested tex
  nested text nested tex nested tex
  nested text nested tex nested tex
 \end{two}
\end{one}
\begin{three}%
 {%
  mandatory argument%
 }
 three text
 three text
 three text
\end{three}
\begin{four}%
 {%
  mandatory argument%
 }%
 {%
  second mandatory%
 }
 four text
 four text
 four text
\end{four}
\begin{five}%
 [%
  optional%
 ]%
 {%
  mandatory argument%
 }%
 {%
  second mandatory%
 }%
 \{ something else\}
 five text
 five text
 five text
\end{five}
\begin{six}%
 {%
  mandatory argument%
 }
 [%
  optional%
 ]
 {%
  second mandatory%
 }%
 [%
  second optional%
 ]%
 \{ something else\}
 six text
 six text
 six text
\end{six}
